/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.oi.eksekutif.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Created by IntelliJ IDEA.
 * Author   : Deny Prasetyo, S.T
 * Email    : jasoet87@gmail.com
 * Blog     : jasoet.wordpress.com
 * Twitter  : http://www.twitter.com/jasoet
 */
@Entity
@Table
public class SuratJalan implements Serializable {

    @Id
    @GeneratedValue
    private Long id;
    @ManyToOne
    private Pengemudi pengemudi;
    @ManyToOne
    private Mobil mobil;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date tanggalKeberangkatan=new Date();
    @OneToOne(targetEntity = Setoran.class)
    private Setoran setoran;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Mobil getMobil() {
        return mobil;
    }

    public void setMobil(Mobil mobil) {
        this.mobil = mobil;
    }

    public Pengemudi getPengemudi() {
        return pengemudi;
    }

    public void setPengemudi(Pengemudi pengemudi) {
        this.pengemudi = pengemudi;
    }

    public Date getTanggalKeberangkatan() {
        return tanggalKeberangkatan;
    }

    public void setTanggalKeberangkatan(Date tanggalKeberangkatan) {
        this.tanggalKeberangkatan = tanggalKeberangkatan;
    }
}
